<div class="row">
    <div class="col-md-2">
    </div>
    <div class="col-md-8">
        <?php

        if (count($data) > 0) {

            ?>
            <table class="table table-bordered">
                <tr>
                    <th width="5%">No</th>
                    <th>Message</th>
                    <th>Create date</th>
                    <th width='15%'></th>
                </tr>
                <?php
                $index = 1;
                foreach ($data as $row) {
                    ?>
                    <tr>
                        <td><?php echo $index++; ?></td>
                        <td><?php echo Transaction::getIdealityName($row['ideality_id']); ?></td>
                        <td><?php echo $row['message']; ?></td>
                        <td><?php echo $row['create_datetime'] ; ?></td>
                        <td> <?php echo CHtml::link('Delete', '#', array('submit' => array('message/delete', 'id' => $row['id']), 'confirm' => 'Are you sure you want to delete this message?', 'class' => 'btn btn-danger btn-xs')); ?></td>
                    </tr>

                <?php
                }
                ?>
            </table>

        <?php
        }
        if (count($data) == 0) {
            echo 'No data available for this category';
        }
        ?>
    </div>
</div><!-- form -->
<div class='col-md-2'></div>
</div>